<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>来一个记录时间的功能</title>
</head>
<body>
<p>
    <center>
    <button onclick="MyFunction()">点击</button>
</center>
</p>

<hr>

<script>
    function MyFunction() {
        setTimeout(function () {
            alert("Hello")
        },3000);
    }
</script>

</body>
</html>